/**
 Copyright will be fixed soon.
 Author: Hiroshi Ota.
 $Date: $
 $Revision: $
*/

#ifdef _BRICKOS_
#include "c++/Sensor.H"
#endif

#ifndef _BRICKOS_

#ifndef _PW_SENSOR_H_
#define _PW_SENSOR_H_

#include "ISimulatorControl.h"

class Sensor
{
public:
        enum Port {
                S1=0,
                S2,
                S3,
                Battery
        };

        Sensor(const Port port, bool makeActive=false, ISimulatorControl* sc=0, char* name=0);
        virtual ~Sensor(void);

        unsigned int get() const;
        void mode(bool makeActive) const;
        void passive() const;
        void active() const;
        void on() const {active();}
        void off() const {passive();}

        // void strobe(const int ms) const{off();delay(ms);on();}

private:
	ISimulatorControl* simCon;
	Port myPort;
};

#endif // _PW_SENSOR_H_

#endif // _BRICKOS_
